<?php foreach($products as $_product) :
	$_link = $curr_link . $_product->product_url;
	$_imglink = base_common . "upload/default/no_image.gif";        
	$price = $_product->price;
	if(!empty($_product->spePrice)){
		$today = date("Y/m/d");			
		if(!empty($_product->speStartDate)){
			if(!empty($_product->speStartDate) && $today >= $_product->speStartDate){
				if(empty($_product->speEndDate) || $today <= $_product->speEndDate)
					$price = $_product->spePrice;
			}
			elseif(!empty($_product->speEndDate) && $today <= $_product->speEndDate){
				$price = $_product->spePrice;										
			}
		}			
	}
	
	$_priceView = format_number($price);        
	if(!empty($_product->image))
		$_imglink = $product_path . add_before_ext("small", $_product->image);
?>    
	<div class="sp_detail">
		<a class="hinh_sp" href="<?php echo $_link; ?>"><img src="<?php echo $_imglink; ?>" width="147" height="154" /></a>
		<div class="ten_sp"><a href="<?php echo $_link; ?>"><?php echo $_product->productName; ?></a></div>
		<div class="gia_sp">
			<p class="gia"><?php echo $_priceView; ?></p>
			<a href="<?php echo $_link; ?>"><?php echo $lang["product"]["detail"]; ?></a>
		</div>
	</div>
<?php endforeach; ?>